<?php
	$ft=null;
	$topic=null;
	if (isSet ($_GET['ft']))	$ft = $_GET['ft'];
	if (isSet ($_GET['topic']))	$topic = $_GET['topic'];
	$journals = $this->getAllJournal($ft,$topic);	
	$topics = $this->getTopics ();
?>
<div id="tabContaier">
	<ul id="tbContentUl">
    	<li><a class="active" href="#tab1">By Titles</a></li>
    	<li><a href="#tab2">By Topic</a></li>
    </ul>
    <div class="tabDetails">
    	<div id="tab1" class="tabContents">
			<div class="contentInTab">
				<h3>Browse Titles:</h3>
				<ul id="browseTiltesUl">
					<?php foreach($this->getFirstLetters() as $key=>$value):?>
						<?php if ($value==1):?>
							<li><a href="<?php echo Epic::getUrl('journal/article/list', array('ft'=>$key))?>"><span><?php echo $key; ?></span></a></li>
						<?php else:?>
							<li><span class="noItem"><?php echo $key; ?></span></li>
						<?php endif;?>
					<?php endforeach;?>
				</ul>
			</div>
        </div>
		
    	<div id="tab2" class="tabContents">
			<div class="contentInTab">
				<h3>Browse Topic:</h3>
				<ul>
				<?php foreach ($topics as $topic):?>
					<li class=""><a href="<?php echo Epic::getUrl('journal/article/list', array('topic'=>$topic['id_topic']))?>"><?php echo $topic['name']?></a></li>
				<?php endforeach?>
				</ul>
			</div>
        </div>
    </div>
</div>
<div class="mainContentBorder">
	<div class="column_slider_left" id="search_filter">
		<div class="results-filter" id="results-filter">
			<div class="header" >
				<h3>
					Filter These Results
				</h3>
			</div>
		</div>
	</div>
	<div class="column_slider" id="primary-content"> 
		<div class="results-display" id="results-display">			
			66 Results Returned
		</div>
		<div class="loop-results-display" id="loop-results-display">
			<?php if($journals):?>
				<?php foreach($journals as $journal):?>
					<div class="detail_rs" >
						<div class="reveal-content-title-full">
							<h3 class="journals-content-title">
								<a href="<?php echo Epic::getUrl('journal/article/listPager', array('id_journal'=>$journal['id_journal']))?>"><?php echo $journal['name']?></a>
							</h3>
							<p class="smFont">            				
									<span class="detailTitle">Publisher: </span> 
									IEEE,<span class="detailTitle">Years: </span> 2013 
									<span class="pushLeft20">
										<a href="/xpl/mostRecentIssue.jsp?punumber=6287639">
										Most Recent Issue
										</a>
									</span>
							</p>
						</div>
						<div class="ClearFix"></div>
					</div>
					<div class="ClearFix"></div>
				<?php endforeach;?>
			<?php else:?>
				<span style="color: blue;">Articles do not appear in this category</span>
			<?php endif;?>
		</div>
	</div>
</div>